<?php
declare (strict_types = 1);

namespace app\mall\model;

use app\mall\enum\ClerkStatusEnum;
use app\mall\enum\YesNoEnum;
use app\mall\model\traits\StoreTrait;
use app\mall\model\traits\UserTrait;
use think\Model;

/**
 * @mixin Model
 * @property ClerkStatusEnum status_enum
 */
class MallStoreClerk extends MallBase
{
    use StoreTrait;
    use UserTrait;
    //
    public function getShopownerTextAttr($key, $data)
    {
        return (new YesNoEnum($data['shopowner']))->getZhName();
    }

    public function getStatusEnumAttr($key, $data)
    {
        return new ClerkStatusEnum($data['status']);
    }

}
